package org.jeecg.modules.wms.entity;

import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.jeecgframework.poi.excel.annotation.Excel;

/**
 * 库存管理
 */
@Data
@TableName("wms_inventory")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "wms_inventory对象", description = "库存")
public class WmsInventory implements Serializable {
    private static final long serialVersionUID = 1L;
    
    /**
     * ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "ID")
    private String id;
    
    /**
     * 物料编码
     */
    @Excel(name = "物料编码", width = 15)
    @ApiModelProperty(value = "物料编码")
    private String materialCode;
    
    /**
     * 物料名称
     */
    @Excel(name = "物料名称", width = 15)
    @ApiModelProperty(value = "物料名称")
    private String materialName;
    
    /**
     * 物料类型（1-型材，2-配件，3-辅件，4-其他，5-余料，6-半料）
     */
    @Excel(name = "物料类型", width = 15, dicCode = "material_type")
    @ApiModelProperty(value = "物料类型")
    private Integer materialType;
    
    /**
     * 规格
     */
    @Excel(name = "规格", width = 15)
    @ApiModelProperty(value = "规格")
    private String specification;
    
    /**
     * 颜色
     */
    @Excel(name = "颜色", width = 15)
    @ApiModelProperty(value = "颜色")
    private String color;

    /**
     * 物料长度
     */
    @Excel(name = "物料长度", width = 15)
    @ApiModelProperty(value = "物料长度")
    private BigDecimal materialLength;

    /**物料系列 */
    @Excel(name = "物料系列", width = 15)
    @ApiModelProperty(value = "物料系列")
    private String materialSeries;

    /**
     * 单位
     */
    @Excel(name = "单位", width = 15)
    @ApiModelProperty(value = "单位")
    private String unit;

    /**
     * 仓库ID
     */
    @ApiModelProperty(value = "仓库ID")
    private String warehouseId;

    /**
     * 仓库名称
     */
    @TableField(exist = false)
    private String warehouseName;

    /**
     * 库位ID
     */
    @ApiModelProperty(value = "库位ID")
    private String locationId;

    /**
     * 库位编码
     */
    @TableField(exist = false)
    private String locationCode;
    
    /**
     * 库位名称
     */
    @TableField(exist = false)
    private String locationName;
    
    /**
     * 库位容量
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "库位容量")
    private BigDecimal capacity;
    
    /**
     * 库存数量
     */
    @Excel(name = "库存数量", width = 15)
    @ApiModelProperty(value = "库存数量")
    private BigDecimal quantity;
    
    /**
     * 可用数量
     */
    @Excel(name = "可用数量", width = 15)
    @ApiModelProperty(value = "可用数量")
    private BigDecimal availableQuantity;
    
    /**
     * 锁定数量
     */
    @Excel(name = "锁定数量", width = 15)
    @ApiModelProperty(value = "锁定数量")
    private BigDecimal lockedQuantity;
    
    /**
     * 预出库数量
     */
    @Excel(name = "预出库数量", width = 15)
    @ApiModelProperty(value = "预出库数量")
    private BigDecimal preOutboundQuantity;
    
    /**
     * 单位成本
     */
    @Excel(name = "单位成本", width = 15)
    @ApiModelProperty(value = "单位成本")
    private BigDecimal unitCost;
    
    /**
     * 总成本
     */
    @Excel(name = "总成本", width = 15)
    @ApiModelProperty(value = "总成本")
    private BigDecimal totalCost;
    
    /**
     * 批次号
     */
    @Excel(name = "批次号", width = 15)
    @ApiModelProperty(value = "批次号")
    private String batchNo;
    
    /**
     * 供应商
     */
    @Excel(name = "供应商", width = 15)
    @ApiModelProperty(value = "供应商")
    private String supplier;
    
    /**
     * 入库时间
     */
    @Excel(name = "入库时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "入库时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date inboundTime;
    
    /**
     * 备注
     */
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
    
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;
    
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    
    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    
    /**
     * 租户ID
     */
    @ApiModelProperty(value = "租户ID")
    private Integer tenantId;
    
    /**
     * 物料图片
     */
    @Excel(name = "物料图片", width = 15)
    @ApiModelProperty(value = "物料图片")
    private String materialImages;
    
    /**
     * 源物料ID（余料特有）
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "源物料ID")
    private String sourceMaterialId;
    
    /**
     * 余料长度（余料特有）
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "余料长度")
    private BigDecimal surplusLength;
    
    /**
     * 是否余料
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "是否余料")
    private Boolean isSurplus;
    
    /**
     * 生产订单ID
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "生产订单ID")
    private String productionOrderId;
} 